import { request } from '../../utils/request';
import { IPage } from '../index';

export interface IGoodsTypeInfo {
  id: string;
  /**
   * 商品名字
   */
  typeName: string;

  /**
   * 描述
   */
  description: string;
}
export const getGoodsTypeList = (data: any) =>
  request<IGoodsTypeInfo[]>({
    url: '/goodsType/list',
    method: 'post',
    data,
  });

export const addGoodsType = (data: any) =>
  request<boolean>({
    url: '/goodsType/add',
    method: 'post',
    data,
  });

export const updateGoodsType = (data: any) =>
  request<boolean>({
    url: '/goodsType/update',
    method: 'post',
    data,
  });
